<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
	</head>
	<body>
			<div id="content">
				外层div元素
				<span>内层span元素</span>
				外层div元素
			</div>
			<div id="msg"></div>
			<script>
				 $(function(){
				 	$("span").bind("click",function(event){
				 		var txt=$("#msg").html()+"<p>内存span元素被点击</p>";
				 		$("#msg").html(txt);
				 		event.stopPropagation();//停止事件冒泡
				 	})
				 	
				 	 	$("#content").bind("click",function(event){
				 		var txt=$("#msg").html()+"<p>内存content元素被点击</p>";
				 		$("#msg").html(txt);
				 		event.stopPropagation();//停止事件冒泡
				 	})
				 
				  	$("body").bind("click",function(event){
				 		var txt=$("#msg").html()+"<p>内存body元素被点击</p>";
				 		$("#msg").html(txt);
				 		event.stopPropagation();//停止事件冒泡
				 	})
				 
				 
				 
				 
				 
				 
				 
				 
				 
				 })
			</script>
			
	</body>
</html>
